-- GENERATED SPELL FOR [Eldreth Spectre] --


function spell0_11473(pUnit, Event) --@Dark Offering,Heal--
pUnit:FullCastSpellOnTarget(7154,pUnit)
pUnit:RegisterEvent('Sorts_11473', 0, 1)
end

function spell1_11473(pUnit, Event) --@Dispel Magic,n/a--
pUnit:FullCastSpellOnTarget(17201,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11473', 620, 1)
end

function spell2_11473(pUnit, Event) --@Greater Invisibility,Self--
pUnit:FullCastSpellOnTarget(16380,pUnit)
pUnit:RegisterEvent('Sorts_11473', 611, 1)
end

function Sorts_11473(pUnit, Event)
local choix_sorts_11473 = math.random(0, 2)
if choix_sorts_11473 == 0 then
pUnit:RegisterEvent('spell0_11473', 1, 1)
end
if choix_sorts_11473 == 1 then
pUnit:RegisterEvent('spell1_11473', 1, 1)
end
if choix_sorts_11473 == 2 then
pUnit:RegisterEvent('spell2_11473', 1, 1)
end
end

function mob11473_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_11473', math.random(1500, 3000), 1)
end

function mob11473_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11473_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11473_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(11473, 1, 'mob11473_Action')
RegisterUnitEvent(11473, 2, 'mob11473_Leave')
RegisterUnitEvent(11473, 3, 'mob11473_Kill')
RegisterUnitEvent(11473, 4, 'mob11473_Die')
